﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ObjectModel.Excel;
using Microsoft.Office.Interop.Excel;

namespace ObjectModel.PowerPoint.New
{
    public class ExcelRangeSourceObject : SourceObject
    {
        ConditionsCollection mConditions;

        public ResolvableRange Range { get; set; }

        public ConditionsCollection Conditions
        {
            get { return mConditions ?? (mConditions = new ConditionsCollection()); }
            set { mConditions = value; }
        }

        public override string GetValue()
        {
            Conditions.ApplyAll();

            Range rng = Range.Resolve();
            return rng.Value;
        }
    }
}
